package spring.exam.control;

import org.apache.logging.log4j.*;
import org.springframework.stereotype.*;
import org.springframework.ui.*;
import org.springframework.web.bind.annotation.*;   

@Controller
public class GreetingController {
	
	/**
	 * Log4j logger
	 */
	static final Logger logger = LogManager.getLogger(GreetingController.class);

    @RequestMapping(value="/bbs/greeting.con" , method = RequestMethod.GET )
    public String greeting(@RequestParam(value="name", required=false, defaultValue="World") String name, Model model) {
        
    	name = "가나다라";
    	
    	logger.trace( "name: " + name );
    	
    	model.addAttribute("name", name);  
        
        return "greeting.html"; 
    }

}